package com.dimeng.entity;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.dimeng.R;

/**
 * @author write by ccn<br>
 *         <b>helloandroid100@gmail.com</b>
 * @version 0.1;2012-5-20 下午7:11:00<br>
 *          descrition:产品搜索结果的ListView的item视图缓存
 */
public class ProductSearchViewCache {
	private View baseView;

	private TextView prodNameView;
	private TextView regionView;
	private TextView publishTiemView;
	private TextView companyNameView;
	private ImageView imageView;

	public ProductSearchViewCache(View baseView) {
		this.baseView = baseView;
	}

	public TextView getProdNameView() {
		if (null == prodNameView)
			prodNameView = (TextView) baseView.findViewById(R.id.prodName);
		return prodNameView;
	}

	public TextView getRegionView() {
		if (null == regionView)
			regionView = (TextView) baseView.findViewById(R.id.prodRegionName);
		return regionView;
	}

	public TextView getPublishTiemView() {
		if (null == publishTiemView)
			publishTiemView = (TextView) baseView
					.findViewById(R.id.prodPublishTime);
		return publishTiemView;
	}

	public TextView getCompanyNameView() {
		if (null == companyNameView)
			companyNameView = (TextView) baseView
					.findViewById(R.id.prodCompany);
		return companyNameView;
	}

	public ImageView getImageView() {
		if (null == imageView)
			imageView = (ImageView) baseView.findViewById(R.id.prodPicture);
		return imageView;
	}
}
